package com.lq.ecoldchain.ui.main.orderlist.orderpay

import com.alibaba.android.arouter.facade.annotation.Autowired
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.lq.ecoldchain.R
import com.lq.ecoldchain.base.BaseNavigator
import com.lq.ecoldchain.base.view.BaseActivity
import com.lq.ecoldchain.databinding.ActivityOrderPayBinding
import org.kodein.di.Kodein
import org.kodein.di.generic.instance

/*
*2019/1/17 0017  18:00
*function by lq
*/
@Route(path = BaseNavigator.orderPay)
class OrderPayActivity:BaseActivity<ActivityOrderPayBinding>(){
    override val layoutId = R.layout.activity_order_pay
    override val viewDelegate: OrderPayDelegate by instance()

    @Autowired
    @JvmField
    var id: String? = ""

    override fun initView() {
        ARouter.getInstance().inject(this)
        titleText("订单支付")
        binding.delegate = viewDelegate
        if(!id.isNullOrEmpty()){
            viewDelegate.viewModel.id = id!!.toInt()

        }
    }

    override val kodein = Kodein.lazy {
        extend(parentKodein)
        import(orderPayKodeinModule)
    }
}